
import { Base } from '../../utils/base.js';

class Home extends Base{
      constructor(){
        super();
      }

     getBannerData(id,callback){
      var params = {
      url : 'banner/'+id,
      sCallback:function(res){
        callback && callback(res.bannerItem);
          }
        };
     this.request(params);
      }

      /*首页主题 */
     getThemeData(callback){
        var params = {
          url : 'theme',
          sCallback: function (data) {
            callback && callback(data);
          }
        };
        this.request(params);
      }

     getProductsData(callback){
        var params = {
          url: 'recent/product',
          sCallback: function (data) {
            callback && callback(data);
          }
        };
        this.request(params);
      }

}

export {Home};